package async;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author chenzhiqiang
 * @date 2018-05-30 20:34:50
 */

@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 拦截路径为所有的请求
        registry.addInterceptor(new LicenseInterceptor()).addPathPatterns("/**");
        super.addInterceptors(registry);
    }

    public static void main(String[] args) {
        System.out.println(0 - 1);
    }
}
